$(document).ready(function () {
    //
    // ARTICLE LOGIC
    //--------------------------\
    // v0.1
    //		
    $('a.popopen').each(function () {
        //
        var path = $(this).attr('rel');
        $(this).attr('rel', '');
        //
        var showAddress =  $(this).attr('showAddress');
        var featureMore = $(this).attr('featureMore');
        $(this).click(function () {
        	//特色的阅读更多，弹出175框
        	if (featureMore){
        		loadArticle175(path);
        	}else{
        		loadArticle(path,showAddress);
        	}
            
        });
        //
    });
    //
    loadArticle = function (path,showAddress) {
        $(".popup.article .container").html('');
        $(".popup.article .container").load(path, null, function () {
            //    $('.pop-info').tinyscrollbar();

        	var height = "192px";//默认不显示地址
        	if (showAddress){
        		height = "180px";
        	}
            $(".pop-info").mCustomScrollbar({
                set_width: "350px",
                set_height: height,
                scrollButtons: {
                    enable: true
                },
                theme: "dark-thick"
            });
        });
        openPopup('article');
    }
    
    loadArticle175 = function (path) {
        //景点、美食、住宿、购物封面弹出
        $(".popup.article175 .container").html('');
        $(".popup.article175 .container").load(path , null, function () {
            $(".pop-info").mCustomScrollbar({
                set_width: "520px",
                //set_height: "127px", //这里是有地址的高度
                set_height: "175px", //这里是没有地址的高度
                scrollButtons: {
                    enable: true
                },
                theme: "dark-thick"
            });
        });
        openPopup('article175');
        //景点、美食、住宿、购物封面弹出
    }
});